export function download({ data, fileName }) {
	const arraybuffer = base64ToArrayBuffer(data);
	let url = window.URL.createObjectURL(new Blob([arraybuffer]));
	let link = document.createElement('a');
	link.style.display = 'none';
	link.href = url;
	link.setAttribute('download', `${fileName}.xlsx`);
	0;
	document.body.appendChild(link);
	link.click();
}
function base64ToArrayBuffer(base64) {
	var binary_string = window.atob(base64);
	var len = binary_string.length;
	var bytes = new Uint8Array(len);
	for (var i = 0; i < len; i++) {
		bytes[i] = binary_string.charCodeAt(i);
	}
	return bytes.buffer;
}
